import request from '@/utils/request'

// 查询组合信息
export function getProfitInfoList(query) {
    return request({
        url: '/pricing/group/getVGroupList.action',
        method: 'get',
        params: query
    })
}

// 新增组合信息
export function addProfitInfo(data) {
    return request({
        url: '/pricing/group/addVGroup.action',
        method: 'post',
        params: data
    })
}

// 修改组合信息
export function uptProfitInfo(data) {
    return request({
        url: '/pricing/group/updateVGroup.action',
        method: 'post',
        params: data
    })
}

// 删除组合信息
export function delProfitInfo(data) {
    return request({
        url: '/pricing/group/deleteVGroup.action',
        method: 'put',
        params: data
    })
}

// 获取组合相关的交易
export function getGroupBalance(data) {
    return request({
        url: '/pricing/trade/queryGroupBalanceByPage.action',
        method: 'get',
        params: data
    })
}

export function execGroupBalance(data) {
    return request({
        url: '/pricing/group/handleGroupBalance.action',
        method: 'get',
        params: data
    })
}

/**查询有当前组合id的部门和用户 */
export function getGroupUserAndDpetPerm(query){
    return request({
        url: '/pricing/group/queryGroupUserAndDeptPerm.action',
        method: 'get',
        params: query
    })
}


/** 修改组合id的权限 */
export function updateGroupPerm(data){
    return request({
        url: '/pricing/group/updateGroupPerm.action',
        method: 'post',
        params: data
    })
}



